package io.kubesphere.devops.core;

/**
 *
 * <p> PartitionZoneLocator 处理分片规则
 *
 * @author gaochuan
 * @since 2021/11/22
 * @version 0.1.0
 * @date 2021/11/22 15:30
 */
public class PartitionZoneLocator {
    private static PartitionByMurmurHash murmurHash;

    private PartitionZoneLocator() {
        throw new IllegalStateException("Utility class");
    }

    static {
        murmurHash = new PartitionByMurmurHash();
        murmurHash.setCount(8);
        murmurHash.init();
    }

    public static Integer calculate(String columnValue){
       return murmurHash.calculate(columnValue);
    }
}
